const path = require("path");

function resolve(dir) {
  return path.join(__dirname, dir);
}

module.exports = {
  // outputDir: "./www/",
  lintOnSave: true,
  publicPath: "./",
  productionSourceMap: false,
  chainWebpack: config => {
    config.resolve.alias.set("@", resolve("src"));
  },
//   configureWebpack: {
//     externals: {
//       'vue': 'Vue',
//       'vue-router': 'VueRouter',
//       'vuex': 'Vuex',
//       'axios': 'axios'
//     }
//   },
  devServer: {
    proxy: {
      // "/api": {
      //   target: "http://192.168.101.95",
      //   changeOrigin: true,
      //   ws: false,
      //   pathRewrite: {
      //     "^/api": ""
      //   }
      // },
      "/api": {
        target: "https://zhongsheyun.com/api",
        changeOrigin: true,
        ws: false,
        pathRewrite: {
          "^/api": ""
        }
      },
    }
  }
};
